class UserData():
    def __init__(self, id, account, money, password):
        self.id = id
        self.account = account
        self.password = password
        self.money = money

    def to_dict(self):
        return {
            'id': self.id,
            'account': self.account,
        }


class TransactionHistory():
    def __init__(self, id, account, transaction_type, money, accepter_name, time):
        self.id = id
        self.account = account
        self.transaction_type = transaction_type
        self.money = money
        self.accepter_name = accepter_name
        self.time = time

    def to_dict(self):
        return {
            'id': self.id,
            'account': self.account,
            'transaction_type': self.transaction_type,
            'money': self.money,
            'accepter_name': self.accepter_name,
            'time': str(self.time)
        }
